package com.hydra.auth.utils;

import com.google.code.kaptcha.Producer;
import com.google.code.kaptcha.util.Config;

import java.util.Properties;
import java.util.Properties;

public class KaptchaUtil {

    private static Producer kaptchaProducer = null;
    private static String sessionKeyValue = null;
    private static String sessionKeyDateValue = null;

    static {
        Properties props = new Properties();
        Config config1 = new Config(props);
        KaptchaUtil.kaptchaProducer = config1.getProducerImpl();
        KaptchaUtil.sessionKeyValue = config1.getSessionKey();
        KaptchaUtil.sessionKeyDateValue = config1.getSessionDate();
    }

    public static Producer getKaptchaProducer(){
        return kaptchaProducer;
    }

    public static String getSessionKeyValue(){
        return sessionKeyValue;
    }

    public static String getSessionKeyDateValue(){
        return sessionKeyDateValue;
    }

}
